package com.yang.springcloudalibaba.service;
import com.yang.springcloud.pojo.Student;
import com.yang.springcloudalibaba.dao.StudentImp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Service
public class StudentServiceImp implements StudentService{

    @Autowired
    private StudentImp si;

    public Map<String, Object> addStudent(Student s) {
        return si.addStudent(s);
    }

    public Map<String, Object> delereStudent(String name) {
        return si.delereStudent(name);
    }

    public Map<String, Object> updateStudent(Student s) {
        return si.updateStudent(s);
    }

    public List<Student> queryAll() {
        return si.queryAll();
    }

    //@GlobalTransactional
    public Student queryById(String passid){
        return si.queryById(passid);
    }


}
